package cn.bdqn.service.impl;

import cn.bdqn.dao.MenuMapper;
import cn.bdqn.pojo.Menu;
import cn.bdqn.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl implements MenuService {
    @Autowired
    MenuMapper menuMapper;
    @Override
    public List<Menu> listAll() {
        return menuMapper.listAll();
    }

    @Override
    public int del(Integer id) {
        return menuMapper.del(id);
    }

    @Override
    public int insert(Menu menu) {
        return menuMapper.insert(menu);
    }

    @Override
    public Menu listAllByid(Integer id) {
        return menuMapper.listAllByid(id);
    }

    @Override
    public Integer upd(Menu menu) {
        return menuMapper.upd(menu);
    }
}
